// 工具函数
const serialize = (param) => {
    const results = [];
    for (const [key, value] of Object.entries(param)) {
        results.push(`${encodeURIComponent(key)}=${encodeURIComponent()}`);
    }
    return results.join("&");
};
const serializeJson = (param) => {
    return JSON.stringify(param);
};
// 给URL添加参数
const addURLData = (url, data) => {
    if (!data) return "";
    const mark = url.includes("?") ? "&" : "?";
    return `${mark}${data}`;
};
export { serialize, addURLData, serializeJson };